home *** CD-ROM | disk | FTP | other *** search
/ The Netter Presenter: Ur…ion in Overactive Bladder / The Netter Presenter: Urinary System - Structure & Function in Overactive Bladder.iso / mac / UrinarySystem.app / Contents / Main.dxr / Internal_18_parse database outline.ls < prev    next >
Encoding:
Text File  |  2005-01-18  |  1.5 KB  |  46 lines

  1. global glDBase
  2.  
  3. on ParseDatabaseOutline theMember
  4.   outline = member(theMember).text
  5.   groupList = [:]
  6.   ImageList = []
  7.   glDBase = [:]
  8.   oldItemDelimiter = the itemDelimiter
  9.   the itemDelimiter = TAB
  10.   repeat with lineNum = the number of lines in outline down to 1
  11.     if item 3 of line lineNum of outline <> EMPTY then
  12.       itemHolder = item 3 of line lineNum of outline
  13.       the itemDelimiter = ","
  14.       repeat with itemNum = 1 to itemHolder.item.count
  15.         add(ImageList, string(word 1 of item itemNum of itemHolder))
  16.       end repeat
  17.       the itemDelimiter = TAB
  18.     end if
  19.     if item 2 of line lineNum of outline <> EMPTY then
  20.       tmp = []
  21.       repeat with a = ImageList.count down to 1
  22.         add(tmp, getAt(ImageList, a))
  23.       end repeat
  24.       ImageList = duplicate(tmp)
  25.       addProp(groupList, item 2 of line lineNum of outline, ImageList)
  26.       ImageList = []
  27.     end if
  28.     if item 1 of line lineNum of outline <> EMPTY then
  29.       tmp = [:]
  30.       repeat with b = groupList.count down to 1
  31.         addProp(tmp, getPropAt(groupList, b), getAt(groupList, b))
  32.       end repeat
  33.       groupList = duplicate(tmp)
  34.       addProp(glDBase, item 1 of line lineNum of outline, groupList)
  35.       groupList = [:]
  36.     end if
  37.   end repeat
  38.   tmp = [:]
  39.   repeat with c = glDBase.count down to 1
  40.     addProp(tmp, getPropAt(glDBase, c), getAt(glDBase, c))
  41.   end repeat
  42.   glDBase = duplicate(tmp)
  43.   member(theMember.word[1] & "DBase").text = string(glDBase)
  44.   the itemDelimiter = oldItemDelimiter
  45. end
  46.